home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn WWW 1999 April
/
cd24-www.iso
/
prog
/
mac
/
snak
/
snak.hqx
/
Snak 2.0.2
/
Scripts
/
repeat
< prev
next >
Wrap
Text File
|
1998-06-25
|
507b
|
29 lines
# Kent Sorensen 06/25/98 : this file is from the standard distribution of ircII
# Use a simply while loop to repeat a command.
alias repeat {
@ rep.cnt = [$0]
while ( rep.cnt > 0 )
{
$1-
@rep.cnt = rep.cnt - 1
}
^assign -rep.cnt
}
# Do the samn thing with recursion See.. SET MAX_RECURSIONS
alias recrepeat {
if ([$0] > 0)
{
$1-
recrepeat ${[$0] -1} $1-
}
}
alias test {
assign blue.1 one
assign blue.2 two
assign blue.3 three
foreach blue ii { echo $ii $blue[$ii] }
}